public class TryJstack {

    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            synchronized (TryJstack.class) {
                while (true) {

                }
            }
        });
        t1.start();
        /*Thread t2 = new Thread(() -> {
            synchronized (TryJstack.class) {
                while (true) {

                }
            }
        });
        t2.start();*/
        try {
            t1.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }


}
